package com.company.project.service.impl;

import com.company.project.pojo.roleVillage.RoleVillage;
import com.company.project.mapper.RoleVillageMapper;
import com.company.project.pojo.roleVillage.RoleVillageDTO;
import com.company.project.service.IRoleVillageService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 任建波
 * @since 2019-08-17
 */
@Service
public class RoleVillageServiceImpl extends ServiceImpl<RoleVillageMapper, RoleVillage> implements IRoleVillageService {

    @Autowired
    private RoleVillageMapper roleVillageMapper;

    /**
     * 根据角色id查询村庄
     */
    @Override
    public List<RoleVillageDTO> getRoleVillageListByRoleId(Integer roleId) {
        List RoleVillageDTOList = roleVillageMapper.getRoleVillageListByRoleId(roleId);
        return RoleVillageDTOList;
    }
}
